<?php
/*
 * Created on
 * Date: Apr 11, 2008
 * Author: William Yang
 */
header('Content-Type: text/xml; charset=UTF-8');
//$handle = fopen("http://www.google.com/ig/api?hl=zh-cn&weather=,,,".$_GET['latitude'].",".$_GET['longitude'], "rb");
if (false) {
	$handle = fopen("http://www.google.com/ig/api?hl=zh-cn&weather=,,,30666700,104067000", "rb");
	$contents = "";
	do {
	   $data = fread($handle, 4096);
	   if (strlen($data) == 0) {
	       break;
	   }
	   $contents .= $data;
	} while(true);
	fclose ($handle);
} else {
	$contents = file_get_contents("http://www.google.com/ig/api?hl=zh-cn&weather=,,,30666700,104067000");
}

echo $contents;
?>
